package com.patterns.strategy;

/**
 * @author fwj
 * @date 2021/4/21 14:22
 **/
public class DogComparator implements Comparator<Dog> {
    @Override
    public int compare(Dog o1, Dog o2) {
        if (o1.food < o2.food) return -1;
        else if (o1.food > o2.food) return 1;
        return 0;
    }
}
